﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Com.JunCaiSoft.Permission.Model
{
    /// <summary>
    /// 账户返回信息
    /// </summary>
    public class UserInfo
    {
        /// <summary>
        /// 用户唯一编码
        /// </summary>
        public virtual Guid Id { get; set; }
        /// <summary>
        /// 用户编码
        /// </summary>
        public virtual String NumCode { get; set; }
        /// <summary>
        /// 用户姓名
        /// </summary>
        public virtual String Name { get; set; }
        /// <summary>
        /// access_token
        /// </summary>
        public virtual String AccessToken { get; set; }
        /// <summary>
        /// 生效时间
        /// </summary>
        public virtual DateTime Begins { get; set; }
        /// <summary>
        /// Token过期时间
        /// </summary>
        public virtual DateTime Expires { get; set; }
        /// <summary>
        /// 存续毫秒
        /// </summary>
        public virtual Int64 StateTime { get { return (Expires - Begins).Ticks; } }
        /// <summary>
        /// 用户权限
        /// </summary>
        public virtual String Authorizes { get; set; }
    }
}
